<?php
/***************************************************************
*  Copyright notice
*  (c) 2009, jianyuzhu@gmail.com
*  All rights reserved
*  This script is part of the PPEMI project.
***************************************************************/

//
$config = array(
		//
		'cname' => 'item',
		
		//
		'class_file' => 'module/product/product.class.php',
		'class_name' => 'ProductBase',
		'class_param' => array('_table_status_usable' => false),
		
		//
		'inject' => array(
				'categories_options' => array(
									'type' => 'cm',
									'class_file' => 'module/product/product.category.class.php', 
									'class_name' => 'ProductCategoryBase',
									'method' => 'getCategoriesFormat',
									'params' => array('', 0, false),
										),
					),
		
		//
		'tpl_type' => 'admin',
		'tpl_file' => 'pagelayout/pagelayout_admin_product.tpl',
		
		//
		'validate_file' => '',
		'validate_class' => 'CommonValidate',
		'validate_fields' => array('field' => 'name', 'valid' => 'null'),
			);

//
include_once(CONFIG_PATH . CONFIG_DIR_CLASSES . 'control/item.control.class.php');
include_once(CONFIG_PATH . CONFIG_DIR_CLASSES . 'control/item.content.control.class.php');
$cntlObj = new ControlItemContentBase($config);
$cntlObj->process();
//
?>